package service

import (
	"gorm.io/gorm"
	"seat-service/model"
	"seat-service/model/dto"
)

type Seat interface {
	DeleteByBuildingIDsWithTransaction(tx *gorm.DB, ids []int) error
	GetByClassroomID(classroomID uint) (seats []model.Seat, err error)
	GetByIdWithTransaction(tx *gorm.DB, seatID uint) (seat model.Seat, err error)
	AddSeat(seat model.Seat) error
	BatchAddSeat(seatDto []dto.BatchAddSeatDto) (int, error)
	DelSeat(id uint) error
	BatchDelSeat(delDto dto.BatchDelDto) error
	UpdateSeat(seat model.Seat) error
	QuerySeat(page, pageSize int) (dto.QuerySeatReturnDto2, error)
	QuerySeatTabulationCampus() ([]model.Campus, error)
	QuerySeatTabulationBuilding(campusId uint) ([]model.Building, error)
	QuerySeatTabulationClassroom(buildingId uint) ([]model.Classroom, error)
	QueryConditionSeat(seatDto dto.ConditionSeatDto) (dto.QuerySeatReturnDto2, error)
	QueryById(id uint) ([]dto.QuerySeatReturn, error)
}
